package org.millenaire_reborn.init;

import net.minecraft.core.registries.Registries;
import net.minecraft.network.chat.Component;
import net.minecraft.world.item.CreativeModeTab;
import net.minecraft.world.item.CreativeModeTabs;
import net.neoforged.neoforge.registries.DeferredHolder;
import net.neoforged.neoforge.registries.DeferredRegister;
import org.millenaire_reborn.MillenaireReborn;

// 模组物品栏
public class ModCreativeModeTabs {


    public static final DeferredRegister<CreativeModeTab> CREATIVE_MODE_TABS = DeferredRegister.create(Registries.CREATIVE_MODE_TAB, MillenaireReborn.MOD_ID);

    public static final DeferredHolder<CreativeModeTab, CreativeModeTab> MILLNAIRE = CREATIVE_MODE_TABS.register("millnaire", () -> CreativeModeTab.builder()
            .title(Component.translatable("itemGroup.millnaire"))
            .withTabsBefore(CreativeModeTabs.COMBAT)
            .icon(() -> ModItems.DENIER.get().getDefaultInstance())
            .displayItems((parameters, output) -> {
                ModItems.ITEMS.getEntries().stream().map(DeferredHolder::get).forEach(output::accept);
            }).build());
}
